package top.chenfu.security.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import top.chenfu.security.dao.MenuDao;
import top.chenfu.security.entity.Menu;
import top.chenfu.security.service.MenuService;

import java.util.List;

/**
 * @Auther chenfu
 * @2019/10/29 14:50
 * @Desc
 */
@Service
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuDao menuDao;

    @Override
    @Cacheable(value = "hashCache",key = "'redis_all_menu'")
    public List<Menu> getAllMenu() {
        return menuDao.selectAll();
    }

}
